package week3;

import java.util.Scanner;

public class BMI{
    public static void main(String[] args) {
        Scanner scanner = new Scanner(System.in);
        System.out.print("请输入体重（千克）:");
        double weight = scanner.nextDouble();
        System.out.print("请输入身高（米）：");
        double height = scanner.nextDouble();
        double bmi = weight / (height * height);
        System.out.println("你的BMI值：" + bmi);
        if (bmi < 18.4) {
            System.out.println("恭喜你，偏瘦");
        } else if (bmi >= 18.5 && bmi <= 23.9) {
            System.out.println("恭喜你，正常，继续保持");
        } else if (bmi >= 24 && bmi <= 27.9) {
            System.out.println("恭喜你，稍微超重");
        } else {
            System.out.println("恭喜你，超重");
        }
        scanner.close();
    }
    }